<?php
/*
 * [JINYUN!] (C)2001-2099 Jinyunweb.com
 * This is NOT a freeware, use is subject to license terms
 * $Id: 2017-12-13 03:39:35 apple $
*/
defined('BY_JYA') or exit('error');
$_RQ['op']=$_RQ['op']?$_RQ['op']:'get';
$return=array();
if($_RQ['op']=='get'){
	$count['hexiao']=pdo_count('jy_h5game_hexiao',array('uniacid'=>$_SESSION['uniacid']));
	$count['award']=pdo_count('jy_h5game_award',array('uniacid'=>$_SESSION['uniacid']));
	$count['game']=pdo_count('jy_h5game_game',array('uniacid'=>$_SESSION['uniacid']));
	$count['nowgame']=pdo_count('jy_h5game_game',array('uniacid'=>$_SESSION['uniacid']));
	$count['fans']=pdo_count('jy_h5game_fans',array('uniacid'=>$_SESSION['uniacid']));
	$time=mktime(0,0,0,date('m'));
	$count['newsfans']=pdo_count('jy_h5game_fans',array('uniacid'=>$_SESSION['uniacid'],'createtime >'=>$time));
	$return['htmls']=array(
				array('type'=>'data','one_num'=>2,'title'=>'数据指标','datas'=>array(
					array('title'=>'总活动个数','num'=>$count['game']),
					array('title'=>'在线活动个数','num'=>$count['nowgame']),
					array('title'=>'核销数据个数','num'=>$count['hexiao']),
					array('title'=>'获奖个数','num'=>$count['award']),
					array('title'=>'新增粉丝数','num'=>$count['newsfans']),
					array('title'=>'总粉丝数','num'=>$count['fans']),
				)),
				array('type'=>'echarts_pie','one_num'=>2,'num'=>6,'ecid'=>'wechat','title'=>'活动数据指标','datas'=>array(
					'time' => date("Y-m-d H:i:s", time()),
					'datas'=>array(
						array('name'=>'总活动个数','value'=>$count['game']),
						array('name'=>'在线活动个数','value'=>$count['game']),
						array('name'=>'核销数据个数','value'=>$count['hexiao']),
						array('name'=>'获奖个数','value'=>$count['award']),
						array('name'=>'新增粉丝数','value'=>$count['newsfans']),
						array('name'=>'总粉丝数','value'=>$count['fans']),
					),
				)),
				array('type'=>'echarts_pie','one_num'=>2,'num'=>6,'ecid'=>'wxapp','title'=>'各活动数据指标','datas'=>array(
					'time' => date("Y-m-d H:i:s", time()),
					'datas'=>array(
						array('name'=>'抽奖活动','value'=>22),
						array('name'=>'游戏营销','value'=>33),
						array('name'=>'节日活动','value'=>55),
						array('name'=>'助力活动','value'=>11),
						array('name'=>'投票活动','value'=>21),
						array('name'=>'签到活动','value'=>18),
					),
				)),
				array('type'=>'echarts_line','num'=>12,'ecid'=>'mobile','title'=>'周报数据指标','datas'=>array(
					'datas'=>array(
						array('name'=>'访问量','value'=>array(8,8,11,12,14,16,18)),
						array('name'=>'粉丝数','value'=>array(8,8,11,12,14,16,18)),
					),
					'xdatas'=>array('周一','周二','周三','周四','周五','周六','周日'),
				)),
				array('type'=>'echarts_bar','num'=>12,'ecid'=>'pc','title'=>'年报数据指标','datas'=>array(
					'datas'=>array(
						array('name'=>'访问量','value'=>array(8,8,11,12,14,16,18,55,33,22,12,56)),
						array('name'=>'粉丝数','value'=>array(8,8,11,12,14,16,18,55,33,22,12,56)),
					),
					'xdatas'=>array("1月", "2月", "3月", "4月", "5月", "6月", "7月", "8月", "9月", "10月", "11月", "12月"),
				)),
	);
	exi($return);
}
?>